#pragma comment(linker, "/STACK:10000000")
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <set>
#include <map>
#include <cstdio>
#include <cassert>
#include <string>
#include <cstring>
#define ldb long double
#define LL long long
#define fi first
#define se second
#define fill(a, c) memset(a, c, sizeof(a))
#define sqr(a) ((a) * (a))
#define nextLine() {int c = 0; while((c = getchar()) != 10 && c != EOF);}
#define getBit(mask, k) (((mask) / pw[k]) % pw[1])
#define setBit(mask, k, l) (((mask) / pw[k + 1] * pw[1] + (l)) * pw[k] + ((mask) % pw[k]))
#define debug(a) cerr << #a << " = " << a << " ";
#define debugl(a) cerr << #a << " = " << a << "\n";
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define ff first
#define ss second 
const ldb LDINF = 9128739847123.00;
const ldb eps = 1e-9;
const int inf = 1 << 28;
const ldb pi = fabsl(atan2l(0.0, -1.0));
using namespace std;

string s;

void load()
{
	cin >> s;
}
bool d[1000023];
int cc[1123];
bool was[123123];
vector <int> pr;

int cntc[1123];
int cnts[1123];
int color[1123];

string res;

void solve()
{
	for (int i = 2; i <= s.size(); i++)
	{
		if (!d[i])
		{
			pr.pb(i);
			for (int j = i *i; j <= s.size(); j+= i)
				d[j] = 1;
		}
	}
	string t = s;
	sort(t.begin(), t.end());
	t.erase(unique(t.begin(), t.end()), t.end());
	for (int i = 0; i < s.size(); i++)
		cnts[s[i] - 'a']++;
	int haha = 0;
	int r = 0;
	for (int i = 0; i < t.size(); i++)
	{
		if (cnts[t[i] - 'a'] > r)
		{
			haha = t[i];
			r = cnts[t[i] - 'a'];
		}
	}
	res = s;
	for (int i = 0; i < res.size(); i++)
		res[i] = 0;
	for (int i = 0; i < s.size(); i++)
	{
		if (was[i]) continue;
		for (int j = 0; j < pr.size(); j++)
			if ((i + 1) == pr[j])
			{
				if (pr[j] * 2 <= s.size())
				{
					for (int k = i; k < s.size(); k+= pr[j])
					{
						if (!was[k])
						{
							res[k] = haha;
							cnts[haha - 'a']--;
							if (cnts[haha - 'a'] < 0)
							{
								cout << "NO";
								return;
							}
							was[k] = 1;
						}
					}
				}
				break;
			}
	}
	for (int i = 0, pos = 0; i < s.size(); i++)
	{
		if (was[i]) continue;
		while (pos < t.size() && cnts[t[pos] - 'a'] == 0) pos++;
		if (pos == t.size())
		{
			cout << "NO";
			return;
		}
		res[i] = t[pos];
		cnts[t[pos] - 'a']--;
	}
	cout << "YES\n";
	cout << res;
}

#define file "a"
int main()
{
	#ifndef ONLINE_JUDGE
		freopen(file".in", "rt", stdin);
		freopen(file".out", "wt", stdout);
	#endif
	load();
	solve();
	return 0;
}
